/**
    访问修饰符
       => 修饰对象属性和方法的关键字，限定属性方法的访问范围
       => 有那些访问修饰符
           private         public            proteced          默认
           只能在类体中访问 在所有地方都访问    受保护            只在当前模块访问
       => 用法
           private name:string;
           public age:number;
           private say(){}


     
 */
class Person {
	private name: string
	public age: number
	constructor(name: string, age: number) {
		this.name = name
		this.age = age
	}
	playGame() {
		console.log(this.name + '玩游戏')
	}
}
const p1: Person = new Person('jack', 18)
console.log(p1.age)
p1.playGame()

